-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Increase read timeout for sagemaker runtime #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #355 +/- ##
==========================================
+ Coverage 92.92% 93.07% +0.14%
==========================================
Files 51 51
Lines 3564 3567 +3
==========================================
+ Hits 3312 3320 +8
+ Misses 252 247 -5
Continue to review full report at Codecov.
|
src/sagemaker/session.py
Outdated
self.sagemaker_runtime_client = sagemaker_runtime_client or self.boto_session.client('runtime.sagemaker') | ||
config = botocore.config.Config(read_timeout=80) | ||
self.sagemaker_runtime_client = sagemaker_runtime_client or self.boto_session.client('runtime.sagemaker', | ||
config=config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be better to create config
only when needed (i.e. only when sagemaker_runtime_client
is None
), and since there's an awkward line break with this change now, I think I'm more inclined toward
if sagemaker_runtime_client is not None:
self.sagemaker_runtime_client = sagemaker_runtime_client
else:
config = botocore.config.Config(read_timeout=80)
self.sagemaker_runtime_client = self.boto_session.client('runtime.sagemaker', config=config)
personal preference, though, and not a strong one at that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Updating.
Disable MKL for TensorFlow iris example to get a better performance.
Increase read timeout for SageMaker runtime, as the hosting endpoint has a time limit on how long an inference can take.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.